home *** CD-ROM | disk | FTP | other *** search
WinHex data structure template | 2001-02-05 | 1.1 KB | 42 lines |
- template "Master Boot Record"
-
- // Template by Stefan Fleischmann
- // To be applied to sector 0 of a physical hard disk.
-
- description "First sector of a physical hard disk"
- appliesto disk
- sector-aligned
- multiple // size is determined dynamically, see below
-
- requires 510 "55 AA"
-
- begin
- read-only hex 446 "Master bootstrap loader code"
-
- numbering 1
-
- {
- section "Partition ~"
- hex 1 "80 = active partition"
- uint8 "Start head"
- binary "Start sector (bits 0-5)"
- binary "Start track (bits 8,9 in bits 6,7 of sector)"
- hex 1 "Operating system indicator (hex)"
- uint8 "End head"
- binary "End sector (bits 0-5)"
- binary "End track (bits 8,9 in bits 6,7 of sector)"
- uint32 "Sectors preceding partition ~"
- uint32 "Length of partition ~ in sectors"
- endsection
- } [4]
-
- read-only hex 2 "Signature (55 AA)"
-
- // Now move the current position to the next
- // partition record, so that the user may browse
- // to see it using the ">" button. The distance
- // is (Sectors preceding partition 2 - 1) * 512.
-
- move[Sectors preceding partition 2] 512
- move -512
- end